//
//  SquareCollectionViewCell.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/21.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "SquareCollectionViewCell.h"

@implementation SquareCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self= [super initWithFrame:frame];
    if (self) {
        //image
        _image = [[UIImageView alloc]init];
       
        [self.contentView addSubview:_image];
       
        [_image release];
        
        //title
        _title =[[UILabel alloc]init];
        _title .font = [UIFont systemFontOfSize:13];
        _title.textAlignment= NSTextAlignmentCenter;
        [self.contentView addSubview:_title];
        [_title release];
    }
    return self;
}
//布局
-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _image.frame =CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    _title.frame = CGRectMake(-15, _image.frame.size.height, 100, 25);
}
@end
